<?php
namespace Search\Form;

use Zend\InputFilter\InputFilter;

class SearchFormFilter extends InputFilter
{

public function __construct()
    {
               
        $this->add(array(
            'name' => 'KEY',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => ''
                        )
                    )
                )
                
            )
        ));
        
        $this->add(array(
            'name' => 'CATEGORY',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => ''
                        )
                    )
                )
        
            )
        ));
        
    }
}